package com.ezandroid.library.network.http.request;

/**
 * Exception style class encapsulating errors
 */
public class RequestException extends Exception {
    public final NetworkResponse networkResponse;

    public RequestException() {
        networkResponse = null;
    }

    public RequestException(NetworkResponse response) {
        networkResponse = response;
    }

    public RequestException(String exceptionMessage) {
        super(exceptionMessage);
        networkResponse = null;
    }

    public RequestException(String exceptionMessage, Throwable reason) {
        super(exceptionMessage, reason);
        networkResponse = null;
    }

    public RequestException(Throwable cause) {
        super(cause);
        networkResponse = null;
    }
}